<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\SysUsers */

$this->title = $model->company_name;
$this->params['breadcrumbs'][] = ['label' => 'Sys Users', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="sys-users-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('返回列表', ['index', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        
        
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
//            'id',
//            'parent_id',
            'phone',
            'parent_phone',
//            'type',
//            'role',
            'last_login_time:datetime',
            'truename',
            'qq',
            'qq_openid',
            'email:email',
            'weixin',
            'wx_openid',
            'tel',
            'company_name',
            'company_addr',
            'company_regnum',
            'company_range',
            'company_spec_range',
            'company_type',
            'company_est_time',
            
            'reg_time:datetime',
            'audit'
//            'company_licence',
//            'status',
        ],
    ]) ?>
    <div style="height:320px;width:420px;float:left;"><span style="font-weight: 700">营业执照</span><br/><br/>
        <img src="http://img.hzp.139club.com/<?=$data['company_licence']?>" style="height:300px;width:400px;margin-left:20px;">
    </div>
    <?php if($model->type == 1 || $model->type == 2){?>
        <div style="height:320px;width:220px;float:left;margin:10px 0 0 50px;"><span style="font-weight: 700">审核不通过原因：</span><br/><br/>
            <input style="width:420px;" type="text" id="nr"><br/><br/><input style="width:420px;" type="hidden" id="uid" value="<?=$model->id?>">
            <span id="tz" style="display: inline-block;width:80px;height:25px;text-align:center;line-height: 25px;border-radius: 3px;background:#428BCA;
            font-size:14px;color:white;font-weight: 600;cursor: pointer;">提交</span>
        </div>
    <?php }?>
    </div>
</div>
<script>
    $(function(){
        $("#tz").click(function(){
            var nr = $("#nr").val();
            var uid = $("#uid").val();
            window.location.href='/sys-users/feedback?nr='+nr+'&id='+uid;
        })
    })
</script>